
import torch
import timm

models = timm.list_models()

count = 0 
for model in timm.list_models():
    print(str(count) + ": jit scripting network:" + model)
    try:
        count=count+1 
        torch.jit.script(timm.create_model(model))
    except RuntimeError as err:
        print("the network" + model + "can't be converted.")
        print("reson: " + str(err))